import request from '@/utils/request'

const baseURL = '/descriptionManagement'

/**
 * 保存或更新文档说明信息
 * @param {{descriptionId: number; descriptionContent: string}} data 
 * @returns 
 */
export const saveOrUpdate = (data) => {
  return request({
    url: `${baseURL}/saveOrUpdate`,
    method: 'post',
    data
  })
}

/**
 * 查询某个文档的说明
 * @param {number} tId 
 * @returns 
 */
export const loadDescription = (tId) => {
  return request({
    url: `${baseURL}/loadDescription`,
    params: {
      descriptionId: tId
    }
  })
}